package com.ysd.lis.controller.lab;


import com.ysd.common.Result;
import com.ysd.lis.controller.pub.BaseController;
import com.ysd.lis.entity.lab.LabTatBaseruleDetail;
import com.ysd.lis.service.lab.LabTatBaseruleDetailService;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * <p>
 * TAT监控基础规则明细 前端控制器
 * </p>
 *
 * @author cfz
 * @since 2024-10-25
 */
@RestController
@RequestMapping("/api/lab-tat-baserule-detail")
public class LabTatBaseruleDetailController extends BaseController {
    @Autowired
    LabTatBaseruleDetailService labTatBaseruleDetailService;

    @ApiOperation("查询")
    @GetMapping("/findLabTatBaseruleDetailList")
    public Result findLabTatBaseruleDetailList(LabTatBaseruleDetail labTatBaseruleDetail) {
        return labTatBaseruleDetailService.findLabTatBaseruleDetailList(labTatBaseruleDetail);
    }

    @ApiOperation("增加")
    @PostMapping("/addLabTatBaseruleDetail")
    public Result addLabTatBaseruleDetail(@RequestBody LabTatBaseruleDetail labTatBaseruleDetails) {
        return labTatBaseruleDetailService.addLabTatBaseruleDetail(labTatBaseruleDetails);
    }

    @ApiOperation("删除")
    @PostMapping("/deleteLabTatBaseruleDetail")
    public Result deleteLabTatBaseruleDetail(@RequestBody LabTatBaseruleDetail labTatBaseruleDetails) {
        return labTatBaseruleDetailService.deleteLabTatBaseruleDetail(labTatBaseruleDetails);
    }

    @ApiOperation("批量删除")
    @PostMapping("/deleteLabTatBaseruleDetailList")
    public Result deleteLabTatBaseruleDetailList(@RequestBody List<LabTatBaseruleDetail> labTatBaseruleDetails) {
        return labTatBaseruleDetailService.deleteLabTatBaseruleDetailList(labTatBaseruleDetails);
    }

    @ApiOperation("修改")
    @PostMapping("/updateLabTatBaseruleDetail")
    public Result updateLabTatBaseruleDetail(@RequestBody LabTatBaseruleDetail labTatBaseruleDetail) {
        return labTatBaseruleDetailService.updateLabTatBaseruleDetail(labTatBaseruleDetail);
    }

    @ApiOperation("批量添加")
    @PostMapping("/addLabTatBaseruleDetailList")
    public Result addLabTatBaseruleDetailList(@RequestBody List<LabTatBaseruleDetail> labTatBaseruleDetails) {
        return labTatBaseruleDetailService.addLabTatBaseruleDetailList(labTatBaseruleDetails);
    }
}
